<?xml version='1.0' encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <link href="cpip.css" rel="stylesheet" type="text/css" />
    <title>File: /Users/paulross/dev/linux/linux-3.13/include/linux/timex.h</title>
  </head>
  <body>
    <h1>File: /Users/paulross/dev/linux/linux-3.13/include/linux/timex.h</h1>
    <p>Green shading in the line number column
means the source is part of the translation unit, red means it is conditionally excluded.
Highlighted line numbers link to the translation unit page. Highlighted macros link to
the macro page.</p>
    <pre><a name="1" /><span class="True">       1:</span> <span class="k">/*****************************************************************************</span>
<a name="2" /><span class="True">       2:</span> <span class="k"> *                                                                           *</span>
<a name="3" /><span class="True">       3:</span> <span class="k"> * Copyright (c) David L. Mills 1993                                         *</span>
<a name="4" /><span class="True">       4:</span> <span class="k"> *                                                                           *</span>
<a name="5" /><span class="True">       5:</span> <span class="k"> * Permission to use, copy, modify, and distribute this software and its     *</span>
<a name="6" /><span class="True">       6:</span> <span class="k"> * documentation for any purpose and without fee is hereby granted, provided *</span>
<a name="7" /><span class="True">       7:</span> <span class="k"> * that the above copyright notice appears in all copies and that both the   *</span>
<a name="8" /><span class="True">       8:</span> <span class="k"> * copyright notice and this permission notice appear in supporting          *</span>
<a name="9" /><span class="True">       9:</span> <span class="k"> * documentation, and that the name University of Delaware not be used in    *</span>
<a name="10" /><span class="True">      10:</span> <span class="k"> * advertising or publicity pertaining to distribution of the software       *</span>
<a name="11" /><span class="True">      11:</span> <span class="k"> * without specific, written prior permission.  The University of Delaware   *</span>
<a name="12" /><span class="True">      12:</span> <span class="k"> * makes no representations about the suitability this software for any      *</span>
<a name="13" /><span class="True">      13:</span> <span class="k"> * purpose.  It is provided &quot;as is&quot; without express or implied warranty.     *</span>
<a name="14" /><span class="True">      14:</span> <span class="k"> *                                                                           *</span>
<a name="15" /><span class="True">      15:</span> <span class="k"> *****************************************************************************/</span>
<a name="16" /><span class="True">      16:</span> 
<a name="17" /><span class="True">      17:</span> <span class="k">/*</span>
<a name="18" /><span class="True">      18:</span> <span class="k"> * Modification history timex.h</span>
<a name="19" /><span class="True">      19:</span> <span class="k"> *</span>
<a name="20" /><span class="True">      20:</span> <span class="k"> * 29 Dec 97    Russell King</span>
<a name="21" /><span class="True">      21:</span> <span class="k"> *    Moved CLOCK_TICK_RATE, CLOCK_TICK_FACTOR and FINETUNE to asm/timex.h</span>
<a name="22" /><span class="True">      22:</span> <span class="k"> *    for ARM machines</span>
<a name="23" /><span class="True">      23:</span> <span class="k"> *</span>
<a name="24" /><span class="True">      24:</span> <span class="k"> *  9 Jan 97    Adrian Sun</span>
<a name="25" /><span class="True">      25:</span> <span class="k"> *      Shifted LATCH define to allow access to alpha machines.</span>
<a name="26" /><span class="True">      26:</span> <span class="k"> *</span>
<a name="27" /><span class="True">      27:</span> <span class="k"> * 26 Sep 94    David L. Mills</span>
<a name="28" /><span class="True">      28:</span> <span class="k"> *    Added defines for hybrid phase/frequency-lock loop.</span>
<a name="29" /><span class="True">      29:</span> <span class="k"> *</span>
<a name="30" /><span class="True">      30:</span> <span class="k"> * 19 Mar 94    David L. Mills</span>
<a name="31" /><span class="True">      31:</span> <span class="k"> *    Moved defines from kernel routines to header file and added new</span>
<a name="32" /><span class="True">      32:</span> <span class="k"> *    defines for PPS phase-lock loop.</span>
<a name="33" /><span class="True">      33:</span> <span class="k"> *</span>
<a name="34" /><span class="True">      34:</span> <span class="k"> * 20 Feb 94    David L. Mills</span>
<a name="35" /><span class="True">      35:</span> <span class="k"> *    Revised status codes and structures for external clock and PPS</span>
<a name="36" /><span class="True">      36:</span> <span class="k"> *    signal discipline.</span>
<a name="37" /><span class="True">      37:</span> <span class="k"> *</span>
<a name="38" /><span class="True">      38:</span> <span class="k"> * 28 Nov 93    David L. Mills</span>
<a name="39" /><span class="True">      39:</span> <span class="k"> *    Adjusted parameters to improve stability and increase poll</span>
<a name="40" /><span class="True">      40:</span> <span class="k"> *    interval.</span>
<a name="41" /><span class="True">      41:</span> <span class="k"> *</span>
<a name="42" /><span class="True">      42:</span> <span class="k"> * 17 Sep 93    David L. Mills</span>
<a name="43" /><span class="True">      43:</span> <span class="k"> *      Created file $NTP/include/sys/timex.h</span>
<a name="44" /><span class="True">      44:</span> <span class="k"> * 07 Oct 93    Torsten Duwe</span>
<a name="45" /><span class="True">      45:</span> <span class="k"> *      Derived linux/timex.h</span>
<a name="46" /><span class="True">      46:</span> <span class="k"> * 1995-08-13    Torsten Duwe</span>
<a name="47" /><span class="True">      47:</span> <span class="k"> *      kernel PLL updated to 1994-12-13 specs (rfc-1589)</span>
<a name="48" /><span class="True">      48:</span> <span class="k"> * 1997-08-30    Ulrich Windl</span>
<a name="49" /><span class="True">      49:</span> <span class="k"> *      Added new constant NTP_PHASE_LIMIT</span>
<a name="50" /><span class="True">      50:</span> <span class="k"> * 2004-08-12    Christoph Lameter</span>
<a name="51" /><span class="True">      51:</span> <span class="k"> *      Reworked time interpolation logic</span>
<a name="52" /><span class="True">      52:</span> <span class="k"> */</span>
<a name="53" /><span class="Maybe">      53:</span> <span class="f">#</span><span class="n">ifndef</span> <a href="cpu.c_macros_ref.html#_X0xJTlVYX1RJTUVYX0hfMA__"><span class="b">_LINUX_TIMEX_H</span></a>
<a name="54" /><span class="Maybe">      54:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_X0xJTlVYX1RJTUVYX0hfMA__"><span class="b">_LINUX_TIMEX_H</span></a>
<a name="55" /><span class="Maybe">      55:</span> 
<a name="56" /><span class="Maybe">      56:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">uapi</span><span class="f">/</span><span class="b">linux</span><span class="f">/</span><span class="b">timex</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="57" /><span class="Maybe">      57:</span> 
<a name="58" /><span class="Maybe">      58:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_QURKX0FESlRJTUVfMA__"><span class="b">ADJ_ADJTIME</span></a>        <span class="c">0x8000</span>    <span class="k">/* switch between adjtime/adjtimex modes */</span>
<a name="59" /><span class="Maybe">      59:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_QURKX09GRlNFVF9TSU5HTEVTSE9UXzA_"><span class="b">ADJ_OFFSET_SINGLESHOT</span></a>    <span class="c">0x0001</span>    <span class="k">/* old-fashioned adjtime */</span>
<a name="60" /><span class="Maybe">      60:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_QURKX09GRlNFVF9SRUFET05MWV8w"><span class="b">ADJ_OFFSET_READONLY</span></a>    <span class="c">0x2000</span>    <span class="k">/* read-only adjtime */</span>
<a name="61" /><span class="Maybe">      61:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">compiler</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="62" /><span class="Maybe">      62:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">types</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="63" /><span class="Maybe">      63:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">param</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="64" /><span class="Maybe">      64:</span> 
<a name="65" /><span class="Maybe">      65:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="m">asm</span><span class="f">/</span><span class="b">timex</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="66" /><span class="Maybe">      66:</span> 
<a name="67" /><span class="Maybe">      67:</span> <span class="f">#</span><span class="n">ifndef</span> <a href="cpu.c_macros_ref.html#_cmFuZG9tX2dldF9lbnRyb3B5XzA_"><span class="b">random_get_entropy</span></a>
<a name="68" /><span class="Maybe">      68:</span> <span class="k">/*</span>
<a name="69" /><span class="Maybe">      69:</span> <span class="k"> * The random_get_entropy() function is used by the /dev/random driver</span>
<a name="70" /><span class="Maybe">      70:</span> <span class="k"> * in order to extract entropy via the relative unpredictability of</span>
<a name="71" /><span class="Maybe">      71:</span> <span class="k"> * when an interrupt takes places versus a high speed, fine-grained</span>
<a name="72" /><span class="Maybe">      72:</span> <span class="k"> * timing source or cycle counter.  Since it will be occurred on every</span>
<a name="73" /><span class="Maybe">      73:</span> <span class="k"> * single interrupt, it must have a very low cost/overhead.</span>
<a name="74" /><span class="Maybe">      74:</span> <span class="k"> *</span>
<a name="75" /><span class="Maybe">      75:</span> <span class="k"> * By default we use get_cycles() for this purpose, but individual</span>
<a name="76" /><span class="Maybe">      76:</span> <span class="k"> * architectures may override this in their asm/timex.h header file.</span>
<a name="77" /><span class="Maybe">      77:</span> <span class="k"> */</span>
<a name="78" /><span class="Maybe">      78:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_cmFuZG9tX2dldF9lbnRyb3B5XzA_"><span class="b">random_get_entropy</span></a><span class="f">(</span><span class="f">)</span>    <span class="b">get_cycles</span><span class="f">(</span><span class="f">)</span>
<a name="79" /><span class="Maybe">      79:</span> <span class="f">#</span><span class="n">endif</span>
<a name="80" /><span class="Maybe">      80:</span> 
<a name="81" /><span class="Maybe">      81:</span> <span class="k">/*</span>
<a name="82" /><span class="Maybe">      82:</span> <span class="k"> * SHIFT_PLL is used as a dampening factor to define how much we</span>
<a name="83" /><span class="Maybe">      83:</span> <span class="k"> * adjust the frequency correction for a given offset in PLL mode.</span>
<a name="84" /><span class="Maybe">      84:</span> <span class="k"> * It also used in dampening the offset correction, to define how</span>
<a name="85" /><span class="Maybe">      85:</span> <span class="k"> * much of the current value in time_offset we correct for each</span>
<a name="86" /><span class="Maybe">      86:</span> <span class="k"> * second. Changing this value changes the stiffness of the ntp</span>
<a name="87" /><span class="Maybe">      87:</span> <span class="k"> * adjustment code. A lower value makes it more flexible, reducing</span>
<a name="88" /><span class="Maybe">      88:</span> <span class="k"> * NTP convergence time. A higher value makes it stiffer, increasing</span>
<a name="89" /><span class="Maybe">      89:</span> <span class="k"> * convergence time, but making the clock more stable.</span>
<a name="90" /><span class="Maybe">      90:</span> <span class="k"> *</span>
<a name="91" /><span class="Maybe">      91:</span> <span class="k"> * In David Mills&apos; nanokernel reference implementation SHIFT_PLL is 4.</span>
<a name="92" /><span class="Maybe">      92:</span> <span class="k"> * However this seems to increase convergence time much too long.</span>
<a name="93" /><span class="Maybe">      93:</span> <span class="k"> *</span>
<a name="94" /><span class="Maybe">      94:</span> <span class="k"> * https://lists.ntp.org/pipermail/hackers/2008-January/003487.html</span>
<a name="95" /><span class="Maybe">      95:</span> <span class="k"> *</span>
<a name="96" /><span class="Maybe">      96:</span> <span class="k"> * In the above mailing list discussion, it seems the value of 4</span>
<a name="97" /><span class="Maybe">      97:</span> <span class="k"> * was appropriate for other Unix systems with HZ=100, and that</span>
<a name="98" /><span class="Maybe">      98:</span> <span class="k"> * SHIFT_PLL should be decreased as HZ increases. However, Linux&apos;s</span>
<a name="99" /><span class="Maybe">      99:</span> <span class="k"> * clock steering implementation is HZ independent.</span>
<a name="100" /><span class="Maybe">     100:</span> <span class="k"> *</span>
<a name="101" /><span class="Maybe">     101:</span> <span class="k"> * Through experimentation, a SHIFT_PLL value of 2 was found to allow</span>
<a name="102" /><span class="Maybe">     102:</span> <span class="k"> * for fast convergence (very similar to the NTPv3 code used prior to</span>
<a name="103" /><span class="Maybe">     103:</span> <span class="k"> * v2.6.19), with good clock stability.</span>
<a name="104" /><span class="Maybe">     104:</span> <span class="k"> *</span>
<a name="105" /><span class="Maybe">     105:</span> <span class="k"> *</span>
<a name="106" /><span class="Maybe">     106:</span> <span class="k"> * SHIFT_FLL is used as a dampening factor to define how much we</span>
<a name="107" /><span class="Maybe">     107:</span> <span class="k"> * adjust the frequency correction for a given offset in FLL mode.</span>
<a name="108" /><span class="Maybe">     108:</span> <span class="k"> * In David Mills&apos; nanokernel reference implementation SHIFT_FLL is 2.</span>
<a name="109" /><span class="Maybe">     109:</span> <span class="k"> *</span>
<a name="110" /><span class="Maybe">     110:</span> <span class="k"> * MAXTC establishes the maximum time constant of the PLL.</span>
<a name="111" /><span class="Maybe">     111:</span> <span class="k"> */</span>
<a name="112" /><span class="Maybe">     112:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_U0hJRlRfUExMXzA_"><span class="b">SHIFT_PLL</span></a>    <span class="c">2</span>    <span class="k">/* PLL frequency factor (shift) */</span>
<a name="113" /><span class="Maybe">     113:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_U0hJRlRfRkxMXzA_"><span class="b">SHIFT_FLL</span></a>    <span class="c">2</span>    <span class="k">/* FLL frequency factor (shift) */</span>
<a name="114" /><span class="Maybe">     114:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_TUFYVENfMA__"><span class="b">MAXTC</span></a>        <span class="c">10</span>    <span class="k">/* maximum time constant (shift) */</span>
<a name="115" /><span class="Maybe">     115:</span> 
<a name="116" /><span class="Maybe">     116:</span> <span class="k">/*</span>
<a name="117" /><span class="Maybe">     117:</span> <span class="k"> * SHIFT_USEC defines the scaling (shift) of the time_freq and</span>
<a name="118" /><span class="Maybe">     118:</span> <span class="k"> * time_tolerance variables, which represent the current frequency</span>
<a name="119" /><span class="Maybe">     119:</span> <span class="k"> * offset and maximum frequency tolerance.</span>
<a name="120" /><span class="Maybe">     120:</span> <span class="k"> */</span>
<a name="121" /><span class="Maybe">     121:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_U0hJRlRfVVNFQ18w"><span class="b">SHIFT_USEC</span></a> <span class="c">16</span>        <span class="k">/* frequency offset scale (shift) */</span>
<a name="122" /><span class="Maybe">     122:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UFBNX1NDQUxFXzA_"><span class="b">PPM_SCALE</span></a> <span class="f">(</span><span class="f">(</span><span class="b">s64</span><span class="f">)</span><a href="cpu.c_macros_ref.html#_TlNFQ19QRVJfVVNFQ18w"><span class="b">NSEC_PER_USEC</span></a> <span class="f">&lt;&lt;</span> <span class="f">(</span><a href="cpu.c_macros_noref.html#_TlRQX1NDQUxFX1NISUZUXzA_"><span class="b">NTP_SCALE_SHIFT</span></a> <span class="f">-</span> <a href="cpu.c_macros_noref.html#_U0hJRlRfVVNFQ18w"><span class="b">SHIFT_USEC</span></a><span class="f">)</span><span class="f">)</span>
<a name="123" /><span class="Maybe">     123:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UFBNX1NDQUxFX0lOVl9TSElGVF8w"><span class="b">PPM_SCALE_INV_SHIFT</span></a> <span class="c">19</span>
<a name="124" /><span class="Maybe">     124:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UFBNX1NDQUxFX0lOVl8w"><span class="b">PPM_SCALE_INV</span></a> <span class="f">(</span><span class="f">(</span><span class="c">1LL</span> <span class="f">&lt;&lt;</span> <span class="f">(</span><a href="cpu.c_macros_noref.html#_UFBNX1NDQUxFX0lOVl9TSElGVF8w"><span class="b">PPM_SCALE_INV_SHIFT</span></a> <span class="f">+</span> <a href="cpu.c_macros_noref.html#_TlRQX1NDQUxFX1NISUZUXzA_"><span class="b">NTP_SCALE_SHIFT</span></a><span class="f">)</span><span class="f">)</span> <span class="f">/</span> \
<a name="125" /><span class="Maybe">     125:</span>                <a href="cpu.c_macros_noref.html#_UFBNX1NDQUxFXzA_"><span class="b">PPM_SCALE</span></a> <span class="f">+</span> <span class="c">1</span><span class="f">)</span>
<a name="126" /><span class="Maybe">     126:</span> 
<a name="127" /><span class="Maybe">     127:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_TUFYUEhBU0VfMA__"><span class="b">MAXPHASE</span></a> <span class="c">500000000L</span>    <span class="k">/* max phase error (ns) */</span>
<a name="128" /><span class="Maybe">     128:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_TUFYRlJFUV8w"><span class="b">MAXFREQ</span></a> <span class="c">500000</span>        <span class="k">/* max frequency error (ns/s) */</span>
<a name="129" /><span class="Maybe">     129:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_TUFYRlJFUV9TQ0FMRURfMA__"><span class="b">MAXFREQ_SCALED</span></a> <span class="f">(</span><span class="f">(</span><span class="b">s64</span><span class="f">)</span><a href="cpu.c_macros_noref.html#_TUFYRlJFUV8w"><span class="b">MAXFREQ</span></a> <span class="f">&lt;&lt;</span> <a href="cpu.c_macros_noref.html#_TlRQX1NDQUxFX1NISUZUXzA_"><span class="b">NTP_SCALE_SHIFT</span></a><span class="f">)</span>
<a name="130" /><span class="Maybe">     130:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_TUlOU0VDXzA_"><span class="b">MINSEC</span></a> <span class="c">256</span>        <span class="k">/* min interval between updates (s) */</span>
<a name="131" /><span class="Maybe">     131:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_TUFYU0VDXzA_"><span class="b">MAXSEC</span></a> <span class="c">2048</span>        <span class="k">/* max interval between updates (s) */</span>
<a name="132" /><span class="Maybe">     132:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_TlRQX1BIQVNFX0xJTUlUXzA_"><span class="b">NTP_PHASE_LIMIT</span></a> <span class="f">(</span><span class="f">(</span><a href="cpu.c_macros_noref.html#_TUFYUEhBU0VfMA__"><span class="b">MAXPHASE</span></a> <span class="f">/</span> <a href="cpu.c_macros_ref.html#_TlNFQ19QRVJfVVNFQ18w"><span class="b">NSEC_PER_USEC</span></a><span class="f">)</span> <span class="f">&lt;&lt;</span> <span class="c">5</span><span class="f">)</span> <span class="k">/* beyond max. dispersion */</span>
<a name="133" /><span class="Maybe">     133:</span> 
<a name="134" /><span class="Maybe">     134:</span> <span class="k">/*</span>
<a name="135" /><span class="Maybe">     135:</span> <span class="k"> * kernel variables</span>
<a name="136" /><span class="Maybe">     136:</span> <span class="k"> * Note: maximum error = NTP synch distance = dispersion + delay / 2;</span>
<a name="137" /><span class="Maybe">     137:</span> <span class="k"> * estimated error = NTP dispersion.</span>
<a name="138" /><span class="Maybe">     138:</span> <span class="k"> */</span>
<a name="139" /><span class="Maybe">     139:</span> <span class="m">extern</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">tick_usec</span><span class="f">;</span>        <span class="k">/* USER_HZ period (usec) */</span>
<a name="140" /><span class="Maybe">     140:</span> <span class="m">extern</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">tick_nsec</span><span class="f">;</span>        <span class="k">/* SHIFTED_HZ period (nsec) */</span>
<a name="141" /><span class="Maybe">     141:</span> 
<a name="142" /><span class="Maybe">     142:</span> <span class="k">/* Required to safely shift negative values */</span>
<a name="143" /><span class="Maybe">     143:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_c2hpZnRfcmlnaHRfMA__"><span class="b">shift_right</span></a><span class="f">(</span><span class="b">x</span><span class="f">,</span> <span class="b">s</span><span class="f">)</span> <span class="f">(</span><span class="f">{</span>    \
<a name="144" /><span class="Maybe">     144:</span>     <span class="b">__typeof__</span><span class="f">(</span><span class="b">x</span><span class="f">)</span> <span class="b">__x</span> <span class="f">=</span> <span class="f">(</span><span class="b">x</span><span class="f">)</span><span class="f">;</span>    \
<a name="145" /><span class="Maybe">     145:</span>     <span class="b">__typeof__</span><span class="f">(</span><span class="b">s</span><span class="f">)</span> <span class="b">__s</span> <span class="f">=</span> <span class="f">(</span><span class="b">s</span><span class="f">)</span><span class="f">;</span>    \
<a name="146" /><span class="Maybe">     146:</span>     <span class="b">__x</span> <span class="f">&lt;</span> <span class="c">0</span> <span class="f">?</span> <span class="f">-</span><span class="f">(</span><span class="f">-</span><span class="b">__x</span> <span class="f">&gt;&gt;</span> <span class="b">__s</span><span class="f">)</span> <span class="f">:</span> <span class="b">__x</span> <span class="f">&gt;&gt;</span> <span class="b">__s</span><span class="f">;</span>    \
<a name="147" /><span class="Maybe">     147:</span> <span class="f">}</span><span class="f">)</span>
<a name="148" /><span class="Maybe">     148:</span> 
<a name="149" /><span class="Maybe">     149:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_TlRQX1NDQUxFX1NISUZUXzA_"><span class="b">NTP_SCALE_SHIFT</span></a>        <span class="c">32</span>
<a name="150" /><span class="Maybe">     150:</span> 
<a name="151" /><span class="Maybe">     151:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_TlRQX0lOVEVSVkFMX0ZSRVFfMA__"><span class="b">NTP_INTERVAL_FREQ</span></a>  <span class="f">(</span><a href="cpu.c_macros_ref.html#_SFpfMQ__"><span class="b">HZ</span></a><span class="f">)</span>
<a name="152" /><span class="Maybe">     152:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_TlRQX0lOVEVSVkFMX0xFTkdUSF8w"><span class="b">NTP_INTERVAL_LENGTH</span></a> <span class="f">(</span><a href="cpu.c_macros_ref.html#_TlNFQ19QRVJfU0VDXzA_"><span class="b">NSEC_PER_SEC</span></a><span class="f">/</span><a href="cpu.c_macros_noref.html#_TlRQX0lOVEVSVkFMX0ZSRVFfMA__"><span class="b">NTP_INTERVAL_FREQ</span></a><span class="f">)</span>
<a name="153" /><span class="Maybe">     153:</span> 
<a name="154" /><span class="Maybe">     154:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">do_adjtimex</span><span class="f">(</span><span class="m">struct</span> <span class="b">timex</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="155" /><span class="Maybe">     155:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">hardpps</span><span class="f">(</span><span class="m">const</span> <span class="m">struct</span> <span class="b">timespec</span> <span class="f">*</span><span class="f">,</span> <span class="m">const</span> <span class="m">struct</span> <span class="b">timespec</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="156" /><span class="Maybe">     156:</span> 
<a name="157" /><span class="Maybe">     157:</span> <span class="m">int</span> <span class="b">read_current_timer</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span> <span class="f">*</span><span class="b">timer_val</span><span class="f">)</span><span class="f">;</span>
<a name="158" /><span class="Maybe">     158:</span> <span class="m">void</span> <span class="b">ntp_notify_cmos_timer</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="159" /><span class="Maybe">     159:</span> 
<a name="160" /><span class="Maybe">     160:</span> <span class="k">/* The clock frequency of the i8253/i8254 PIT */</span>
<a name="161" /><span class="Maybe">     161:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UElUX1RJQ0tfUkFURV8w"><span class="b">PIT_TICK_RATE</span></a> <span class="c">1193182ul</span>
<a name="162" /><span class="Maybe">     162:</span> 
<a name="163" /><span class="True">     163:</span> <span class="f">#</span><span class="n">endif</span> <span class="k">/* LINUX_TIMEX_H */</span>
<a name="164" /><span class="True">     164:</span> </pre>
  </body>
</html>
